import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import pageHome from '../views/pageHome.vue'
import navigationBar from '../components/navigationBar.vue'
import herderBar from '../components/headerBar.vue'
import footerBar from '../components/footerBar.vue'
import teacherManagement from '../views/commonSettings/teacherManagement.vue'
import studentManagement from '../views/commonSettings/studentManagement.vue'
import announcementManagement from '../views/commonSettings/announcementManagement.vue'
import systemConfiguration from '../views/commonSettings/systemConfiguration.vue'
import judgmentServer from '../views/commonSettings/judgmentServer.vue'
import problemList from '../views/problem/problemList.vue'
import addTopic from '../views/problem/addTopic.vue'
import imAndexp from '../views/problem/imAndexp.vue'
import competitionList from '../views/competitionPractice/competitionList.vue'
import createCompetition from '../views/competitionPractice/createCompetition.vue'
import courseList from '../views/curriculum/courseList.vue'
import createCourse from '../views/curriculum/createCourse.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/pageHome',
    name: 'pageHome',
    component: pageHome
  },
  {
    path:'/navigationBar',
    name:'navigationBar',
    component:navigationBar
  },
  {
    path:'/herderBar',
    name:'herderBar',
    component:herderBar
  },
  {
    path:'/footerBar',
    name:'footerBar',
    component:footerBar
  },
  {
    path:'/teacherManagement',
    name:'teacherManagement',
    component:teacherManagement
  },
  {
    path:'/studentManagement',
    name:'studentManagement',
    component:studentManagement
  },
  {
    path:'/announcementManagement',
    name:'announcementManagement',
    component:announcementManagement
  },
  {
    path:'/systemConfiguration',
    name:'systemConfiguration',
    component:systemConfiguration
  },
  {
    path:'/judgmentServer',
    name:'judgmentServer',
    component:judgmentServer
  },
  {
    path:'/problemList',
    name:'problemList',
    component:problemList
  },
  {
    path:'/addTopic',
    name:'addTopic',
    component:addTopic
  },
  {
    path:'/imAndexp',
    name:'imAndexp',
    component:imAndexp
  },
  {
    path:'/competitionList',
    name:'competitionList',
    component:competitionList
  },
  {
    path:'/createCompetition',
    name:'createCompetition',
    component:createCompetition
  },
  {
    path:'/courseList',
    name:'courseList',
    component:courseList
  },
  {
    path:'/createCourse',
    name:'createCourse',
    component:createCourse
  },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
